import { createApp } from 'vue'
import App from './App.vue'
import router, { setupRouter } from '@/router'

import { registerUI } from '@/plugins/bin-ui-next'
import { registerEditor } from '@/plugins/bin-editor-next'
// import { registerCharts } from '@/plugins/bin-charts-next'
// import { registerDatav } from '@/plugins/bin-datav'
import { registerCommonComps } from '@/components/index'
import 'bin-ui-next/lib/styles/normalize.css' // 初始化样式
import 'bin-ui-next/lib/styles/scrollbar.css' // 滚动条样式
import 'bin-ui-next/lib/styles/index.css' // 组件库样式
// import 'bin-datav/lib/styles/index.css'
import '@/assets/stylus/index.styl' // 项目样式

const app = createApp(App)
registerUI(app)
registerEditor(app)
// registerCharts(app)
// registerDatav(app)
registerCommonComps(app)

setupRouter(app)
// Mount when the route is ready
router.isReady().then(() => {
  app.mount('#app', true)
})
